<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title></title>
	</head>
	<body>
		<button id="doSomethings" type="button" onclick="btnClick1()">登录</button>
        <button id="doSomethings" type="button" onclick="btnClick2()">注销</button>
	</body>
</html>
<script>
<!--	window.onload=function(){-->
<!--		var myBtn = document.getElementById("doSomethings");-->
<!--		myBtn.addEventListener('click',function(event){-->
<!--			-->
<!--			window.webkit.messageHandlers.openBigPicture.postMessage({methodName:"login:",userName:"xiaoming"});-->
<!--			-->
<!--		});-->
<!--	}-->
    function btnClick1() {

        window.webkit.messageHandlers.login.postMessage({methodName:"login",userName:"xiaoming"});
      
    }
function btnClick2() {

    window.webkit.messageHandlers.loginOut.postMessage({methodName:"loginOut",userName:"wangming"});
}
</script>
